home *** CD-ROM | disk | FTP | other *** search
Unknown | 1999-10-20 | 2.7 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 61 2a 63 6c 61 73 73 20 |........|a*class |
|00000010| 57 65 62 53 65 72 76 65 | 72 20 65 78 70 61 6e 64 |WebServe|r expand|
|00000020| 73 20 54 63 70 4c 69 6e | 6b 3b 0d 0a 0d 0a 76 61 |s TcpLin|k;....va|
|00000030| 72 20 63 6f 6e 66 69 67 | 20 73 74 72 69 6e 67 20 |r config| string |
|00000040| 41 70 70 6c 69 63 61 74 | 69 6f 6e 73 5b 31 30 5d |Applicat|ions[10]|
|00000050| 3b 0d 0a 76 61 72 20 63 | 6f 6e 66 69 67 20 73 74 |;..var c|onfig st|
|00000060| 72 69 6e 67 20 41 70 70 | 6c 69 63 61 74 69 6f 6e |ring App|lication|
|00000070| 50 61 74 68 73 5b 31 30 | 5d 3b 0d 0a 76 61 72 20 |Paths[10|];..var |
|00000080| 63 6f 6e 66 69 67 20 69 | 6e 74 20 4c 69 73 74 65 |config i|nt Liste|
|00000090| 6e 50 6f 72 74 3b 0d 0a | 76 61 72 20 63 6f 6e 66 |nPort;..|var conf|
|000000a0| 69 67 20 69 6e 74 20 4d | 61 78 43 6f 6e 6e 65 63 |ig int M|axConnec|
|000000b0| 74 69 6f 6e 73 3b 0d 0a | 76 61 72 20 63 6f 6e 66 |tions;..|var conf|
|000000c0| 69 67 20 73 74 72 69 6e | 67 20 53 65 72 76 65 72 |ig strin|g Server|
|000000d0| 4e 61 6d 65 3b 0d 0a 76 | 61 72 20 63 6f 6e 66 69 |Name;..v|ar confi|
|000000e0| 67 20 62 6f 6f 6c 20 62 | 45 6e 61 62 6c 65 64 3b |g bool b|Enabled;|
|000000f0| 0d 0a 76 61 72 20 63 6f | 6e 66 69 67 20 69 6e 74 |..var co|nfig int|
|00000100| 20 44 65 66 61 75 6c 74 | 41 70 70 6c 69 63 61 74 | Default|Applicat|
|00000110| 69 6f 6e 3b 0d 0a 0d 0a | 76 61 72 20 73 74 72 69 |ion;....|var stri|
|00000120| 6e 67 20 53 65 72 76 65 | 72 55 52 4c 3b 0d 0a 76 |ng Serve|rURL;..v|
|00000130| 61 72 20 57 65 62 41 70 | 70 6c 69 63 61 74 69 6f |ar WebAp|plicatio|
|00000140| 6e 20 41 70 70 6c 69 63 | 61 74 69 6f 6e 4f 62 6a |n Applic|ationObj|
|00000150| 65 63 74 73 5b 31 30 5d | 3b 0d 0a 0d 0a 76 61 72 |ects[10]|;....var|
|00000160| 20 69 6e 74 20 43 6f 6e | 6e 65 63 74 69 6f 6e 43 | int Con|nectionC|
|00000170| 6f 75 6e 74 3b 0d 0a 0d | 0a 66 75 6e 63 74 69 6f |ount;...|.functio|
|00000180| 6e 20 42 65 67 69 6e 50 | 6c 61 79 28 29 0d 0a 7b |n BeginP|lay()..{|
|00000190| 0d 0a 09 6c 6f 63 61 6c | 20 69 6e 74 20 69 3b 0d |...local| int i;.|
|000001a0| 0a 09 6c 6f 63 61 6c 20 | 63 6c 61 73 73 3c 57 65 |..local |class<We|
|000001b0| 62 41 70 70 6c 69 63 61 | 74 69 6f 6e 3e 20 41 70 |bApplica|tion> Ap|
|000001c0| 70 6c 69 63 61 74 69 6f | 6e 43 6c 61 73 73 3b 0d |plicatio|nClass;.|
|000001d0| 0a 09 6c 6f 63 61 6c 20 | 49 70 41 64 64 72 20 6c |..local |IpAddr l|
|000001e0| 3b 0d 0a 09 6c 6f 63 61 | 6c 20 73 74 72 69 6e 67 |;...loca|l string|
|000001f0| 20 73 3b 0d 0a 0d 0a 09 | 69 66 28 21 62 45 6e 61 | s;.....|if(!bEna|
|00000200| 62 6c 65 64 29 0d 0a 09 | 7b 0d 0a 09 09 4c 6f 67 |bled)...|{....Log|
|00000210| 28 22 57 65 62 73 65 72 | 76 65 72 20 69 73 20 6e |("Webser|ver is n|
|00000220| 6f 74 20 65 6e 61 62 6c | 65 64 2e 20 20 53 65 74 |ot enabl|ed. Set|
|00000230| 20 62 45 6e 61 62 6c 65 | 64 20 74 6f 20 54 72 75 | bEnable|d to Tru|
|00000240| 65 20 69 6e 20 41 64 76 | 61 6e 63 65 64 20 4f 70 |e in Adv|anced Op|
|00000250| 74 69 6f 6e 73 2e 22 29 | 3b 0d 0a 09 09 44 65 73 |tions.")|;....Des|
|00000260| 74 72 6f 79 28 29 3b 0d | 0a 09 09 72 65 74 75 72 |troy();.|...retur|
|00000270| 6e 3b 0d 0a 09 7d 0d 0a | 0d 0a 09 53 75 70 65 72 |n;...}..|...Super|
|00000280| 2e 42 65 67 69 6e 50 6c | 61 79 28 29 3b 0d 0a 09 |.BeginPl|ay();...|
|00000290| 0d 0a 09 66 6f 72 28 69 | 3d 30 3b 69 3c 31 30 3b |...for(i|=0;i<10;|
|000002a0| 69 2b 2b 29 0d 0a 09 7b | 0d 0a 09 09 69 66 28 41 |i++)...{|....if(A|
|000002b0| 70 70 6c 69 63 61 74 69 | 6f 6e 73 5b 69 5d 20 3d |pplicati|ons[i] =|
|000002c0| 3d 20 22 22 29 0d 0a 09 | 09 09 62 72 65 61 6b 3b |= "")...|..break;|
|000002d0| 0d 0a 0d 0a 09 09 41 70 | 70 6c 69 63 61 74 69 6f |......Ap|plicatio|
|000002e0| 6e 43 6c 61 73 73 20 3d | 20 63 6c 61 73 73 3c 57 |nClass =| class<W|
|000002f0| 65 62 41 70 70 6c 69 63 | 61 74 69 6f 6e 3e 28 44 |ebApplic|ation>(D|
|00000300| 79 6e 61 6d 69 63 4c 6f | 61 64 4f 62 6a 65 63 74 |ynamicLo|adObject|
|00000310| 28 41 70 70 6c 69 63 61 | 74 69 6f 6e 73 5b 69 5d |(Applica|tions[i]|
|00000320| 2c 20 63 6c 61 73 73 27 | 43 6c 61 73 73 27 29 29 |, class'|Class'))|
|00000330| 3b 0d 0a 09 09 69 66 28 | 41 70 70 6c 69 63 61 74 |;....if(|Applicat|
|00000340| 69 6f 6e 43 6c 61 73 73 | 20 21 3d 20 4e 6f 6e 65 |ionClass| != None|
|00000350| 29 0d 0a 09 09 7b 0d 0a | 09 09 09 41 70 70 6c 69 |)....{..|...Appli|
|00000360| 63 61 74 69 6f 6e 4f 62 | 6a 65 63 74 73 5b 69 5d |cationOb|jects[i]|
|00000370| 20 3d 20 4e 65 77 28 4e | 6f 6e 65 29 20 41 70 70 | = New(N|one) App|
|00000380| 6c 69 63 61 74 69 6f 6e | 43 6c 61 73 73 3b 0d 0a |lication|Class;..|
|00000390| 09 09 09 41 70 70 6c 69 | 63 61 74 69 6f 6e 4f 62 |...Appli|cationOb|
|000003a0| 6a 65 63 74 73 5b 69 5d | 2e 4c 65 76 65 6c 20 3d |jects[i]|.Level =|
|000003b0| 20 4c 65 76 65 6c 3b 0d | 0a 09 09 09 41 70 70 6c | Level;.|....Appl|
|000003c0| 69 63 61 74 69 6f 6e 4f | 62 6a 65 63 74 73 5b 69 |icationO|bjects[i|
|000003d0| 5d 2e 57 65 62 53 65 72 | 76 65 72 20 3d 20 53 65 |].WebSer|ver = Se|
|000003e0| 6c 66 3b 0d 0a 09 09 09 | 41 70 70 6c 69 63 61 74 |lf;.....|Applicat|
|000003f0| 69 6f 6e 4f 62 6a 65 63 | 74 73 5b 69 5d 2e 50 61 |ionObjec|ts[i].Pa|
|00000400| 74 68 20 3d 20 41 70 70 | 6c 69 63 61 74 69 6f 6e |th = App|lication|
|00000410| 50 61 74 68 73 5b 69 5d | 3b 0d 0a 09 09 09 41 70 |Paths[i]|;.....Ap|
|00000420| 70 6c 69 63 61 74 69 6f | 6e 4f 62 6a 65 63 74 73 |plicatio|nObjects|
|00000430| 5b 69 5d 2e 49 6e 69 74 | 28 29 3b 0d 0a 09 09 7d |[i].Init|();....}|
|00000440| 0d 0a 09 7d 0d 0a 0d 0a | 09 69 66 28 53 65 72 76 |...}....|.if(Serv|
|00000450| 65 72 4e 61 6d 65 20 3d | 3d 20 22 22 29 0d 0a 09 |erName =|= "")...|
|00000460| 7b 0d 0a 09 09 47 65 74 | 4c 6f 63 61 6c 49 50 28 |{....Get|LocalIP(|
|00000470| 6c 29 3b 0d 0a 09 09 73 | 20 3d 20 49 70 41 64 64 |l);....s| = IpAdd|
|00000480| 72 54 6f 53 74 72 69 6e | 67 28 6c 29 3b 0d 0a 09 |rToStrin|g(l);...|
|00000490| 09 69 20 3d 20 49 6e 53 | 74 72 28 73 2c 20 22 3a |.i = InS|tr(s, ":|
|000004a0| 22 29 3b 0d 0a 09 09 69 | 66 28 69 20 21 3d 20 2d |");....i|f(i != -|
|000004b0| 31 29 0d 0a 09 09 09 73 | 20 3d 20 4c 65 66 74 28 |1).....s| = Left(|
|000004c0| 73 2c 20 69 29 3b 0d 0a | 09 09 53 65 72 76 65 72 |s, i);..|..Server|
|000004d0| 55 52 4c 20 3d 20 22 68 | 74 74 70 3a 2f 2f 22 24 |URL = "h|ttp://"$|
|000004e0| 73 3b 0d 0a 09 7d 0d 0a | 09 65 6c 73 65 0d 0a 09 |s;...}..|.else...|
|000004f0| 09 53 65 72 76 65 72 55 | 52 4c 20 3d 20 22 68 74 |.ServerU|RL = "ht|
|00000500| 74 70 3a 2f 2f 22 24 53 | 65 72 76 65 72 4e 61 6d |tp://"$S|erverNam|
|00000510| 65 3b 0d 0a 0d 0a 09 69 | 66 28 4c 69 73 74 65 6e |e;.....i|f(Listen|
|00000520| 50 6f 72 74 20 21 3d 20 | 38 30 29 0d 0a 09 09 53 |Port != |80)....S|
|00000530| 65 72 76 65 72 55 52 4c | 20 3d 20 53 65 72 76 65 |erverURL| = Serve|
|00000540| 72 55 52 4c 20 24 20 22 | 3a 22 24 73 74 72 69 6e |rURL $ "|:"$strin|
|00000550| 67 28 4c 69 73 74 65 6e | 50 6f 72 74 29 3b 0d 0a |g(Listen|Port);..|
|00000560| 0d 0a 09 42 69 6e 64 50 | 6f 72 74 28 20 4c 69 73 |...BindP|ort( Lis|
|00000570| 74 65 6e 50 6f 72 74 20 | 29 3b 0d 0a 09 4c 69 73 |tenPort |);...Lis|
|00000580| 74 65 6e 28 29 3b 0d 0a | 7d 0d 0a 0d 0a 65 76 65 |ten();..|}....eve|
|00000590| 6e 74 20 44 65 73 74 72 | 6f 79 65 64 28 29 0d 0a |nt Destr|oyed()..|
|000005a0| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 69 6e 74 20 69 3b |{...loca|l int i;|
|000005b0| 0d 0a 0d 0a 09 66 6f 72 | 28 69 3d 30 3b 69 3c 31 |.....for|(i=0;i<1|
|000005c0| 30 3b 69 2b 2b 29 0d 0a | 09 09 69 66 28 41 70 70 |0;i++)..|..if(App|
|000005d0| 6c 69 63 61 74 69 6f 6e | 4f 62 6a 65 63 74 73 5b |lication|Objects[|
|000005e0| 69 5d 20 21 3d 20 4e 6f | 6e 65 29 0d 0a 09 09 7b |i] != No|ne)....{|
|000005f0| 0d 0a 09 09 09 41 70 70 | 6c 69 63 61 74 69 6f 6e |.....App|lication|
|00000600| 4f 62 6a 65 63 74 73 5b | 69 5d 2e 43 6c 65 61 6e |Objects[|i].Clean|
|00000610| 75 70 28 29 3b 0d 0a 09 | 09 09 41 70 70 6c 69 63 |up();...|..Applic|
|00000620| 61 74 69 6f 6e 4f 62 6a | 65 63 74 73 5b 69 5d 2e |ationObj|ects[i].|
|00000630| 4c 65 76 65 6c 20 3d 20 | 4e 6f 6e 65 3b 0d 0a 09 |Level = |None;...|
|00000640| 09 09 41 70 70 6c 69 63 | 61 74 69 6f 6e 4f 62 6a |..Applic|ationObj|
|00000650| 65 63 74 73 5b 69 5d 2e | 57 65 62 53 65 72 76 65 |ects[i].|WebServe|
|00000660| 72 20 3d 20 4e 6f 6e 65 | 3b 0d 0a 09 09 09 41 70 |r = None|;.....Ap|
|00000670| 70 6c 69 63 61 74 69 6f | 6e 4f 62 6a 65 63 74 73 |plicatio|nObjects|
|00000680| 5b 69 5d 20 3d 20 4e 6f | 6e 65 3b 0d 0a 09 09 7d |[i] = No|ne;....}|
|00000690| 0d 0a 0d 0a 09 53 75 70 | 65 72 2e 44 65 73 74 72 |.....Sup|er.Destr|
|000006a0| 6f 79 65 64 28 29 3b 0d | 0a 7d 0d 0a 0d 0a 65 76 |oyed();.|.}....ev|
|000006b0| 65 6e 74 20 47 61 69 6e | 65 64 43 68 69 6c 64 28 |ent Gain|edChild(|
|000006c0| 20 41 63 74 6f 72 20 43 | 20 29 0d 0a 7b 0d 0a 09 | Actor C| )..{...|
|000006d0| 53 75 70 65 72 2e 47 61 | 69 6e 65 64 43 68 69 6c |Super.Ga|inedChil|
|000006e0| 64 28 43 29 3b 0d 0a 09 | 43 6f 6e 6e 65 63 74 69 |d(C);...|Connecti|
|000006f0| 6f 6e 43 6f 75 6e 74 2b | 2b 3b 0d 0a 0d 0a 09 2f |onCount+|+;...../|
|00000700| 2f 20 69 66 20 74 6f 6f | 20 6d 61 6e 79 20 63 6f |/ if too| many co|
|00000710| 6e 6e 65 63 74 69 6f 6e | 73 2c 20 63 6c 6f 73 65 |nnection|s, close|
|00000720| 20 64 6f 77 6e 20 6c 69 | 73 74 65 6e 2e 0d 0a 09 | down li|sten....|
|00000730| 69 66 28 4d 61 78 43 6f | 6e 6e 65 63 74 69 6f 6e |if(MaxCo|nnection|
|00000740| 73 20 3e 20 30 20 26 26 | 20 43 6f 6e 6e 65 63 74 |s > 0 &&| Connect|
|00000750| 69 6f 6e 43 6f 75 6e 74 | 20 3e 20 4d 61 78 43 6f |ionCount| > MaxCo|
|00000760| 6e 6e 65 63 74 69 6f 6e | 73 20 26 26 20 4c 69 6e |nnection|s && Lin|
|00000770| 6b 53 74 61 74 65 20 3d | 3d 20 53 54 41 54 45 5f |kState =|= STATE_|
|00000780| 4c 69 73 74 65 6e 69 6e | 67 29 0d 0a 09 7b 0d 0a |Listenin|g)...{..|
|00000790| 09 09 4c 6f 67 28 22 57 | 65 62 53 65 72 76 65 72 |..Log("W|ebServer|
|000007a0| 3a 20 54 6f 6f 20 6d 61 | 6e 79 20 63 6f 6e 6e 65 |: Too ma|ny conne|
|000007b0| 63 74 69 6f 6e 73 20 2d | 20 63 6c 6f 73 69 6e 67 |ctions -| closing|
|000007c0| 20 64 6f 77 6e 20 4c 69 | 73 74 65 6e 2e 22 29 3b | down Li|sten.");|
|000007d0| 0d 0a 09 09 43 6c 6f 73 | 65 28 29 3b 0d 0a 09 7d |....Clos|e();...}|
|000007e0| 0d 0a 7d 0d 0a 0d 0a 65 | 76 65 6e 74 20 4c 6f 73 |..}....e|vent Los|
|000007f0| 74 43 68 69 6c 64 28 20 | 41 63 74 6f 72 20 43 20 |tChild( |Actor C |
|00000800| 29 0d 0a 7b 0d 0a 09 53 | 75 70 65 72 2e 4c 6f 73 |)..{...S|uper.Los|
|00000810| 74 43 68 69 6c 64 28 43 | 29 3b 0d 0a 09 43 6f 6e |tChild(C|);...Con|
|00000820| 6e 65 63 74 69 6f 6e 43 | 6f 75 6e 74 2d 2d 3b 0d |nectionC|ount--;.|
|00000830| 0a 0d 0a 09 2f 2f 20 69 | 66 20 63 6c 6f 73 65 64 |....// i|f closed|
|00000840| 20 64 75 65 20 74 6f 20 | 74 6f 6f 20 6d 61 6e 79 | due to |too many|
|00000850| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 73 2c 20 73 74 | connect|ions, st|
|00000860| 61 72 74 20 6c 69 73 74 | 65 6e 69 6e 67 20 61 67 |art list|ening ag|
|00000870| 61 69 6e 2e 0d 0a 09 69 | 66 28 43 6f 6e 6e 65 63 |ain....i|f(Connec|
|00000880| 74 69 6f 6e 43 6f 75 6e | 74 20 3c 3d 20 4d 61 78 |tionCoun|t <= Max|
|00000890| 43 6f 6e 6e 65 63 74 69 | 6f 6e 73 20 26 26 20 4c |Connecti|ons && L|
|000008a0| 69 6e 6b 53 74 61 74 65 | 20 21 3d 20 53 54 41 54 |inkState| != STAT|
|000008b0| 45 5f 4c 69 73 74 65 6e | 69 6e 67 29 0d 0a 09 7b |E_Listen|ing)...{|
|000008c0| 0d 0a 09 09 4c 6f 67 28 | 22 57 65 62 53 65 72 76 |....Log(|"WebServ|
|000008d0| 65 72 3a 20 4c 69 73 74 | 65 6e 69 6e 67 20 61 67 |er: List|ening ag|
|000008e0| 61 69 6e 20 2d 20 63 6f | 6e 6e 65 63 74 69 6f 6e |ain - co|nnection|
|000008f0| 73 20 68 61 76 65 20 62 | 65 65 6e 20 63 6c 6f 73 |s have b|een clos|
|00000900| 65 64 2e 22 29 3b 0d 0a | 09 09 4c 69 73 74 65 6e |ed.");..|..Listen|
|00000910| 28 29 3b 0d 0a 09 7d 0d | 0a 7d 0d 0a 0d 0a 66 75 |();...}.|.}....fu|
|00000920| 6e 63 74 69 6f 6e 20 57 | 65 62 41 70 70 6c 69 63 |nction W|ebApplic|
|00000930| 61 74 69 6f 6e 20 47 65 | 74 41 70 70 6c 69 63 61 |ation Ge|tApplica|
|00000940| 74 69 6f 6e 28 73 74 72 | 69 6e 67 20 55 52 49 2c |tion(str|ing URI,|
|00000950| 20 6f 75 74 20 73 74 72 | 69 6e 67 20 53 75 62 55 | out str|ing SubU|
|00000960| 52 49 29 0d 0a 7b 0d 0a | 09 6c 6f 63 61 6c 20 69 |RI)..{..|.local i|
|00000970| 6e 74 20 69 2c 20 6c 3b | 0d 0a 0d 0a 09 53 75 62 |nt i, l;|.....Sub|
|00000980| 55 52 49 20 3d 20 22 22 | 3b 0d 0a 09 66 6f 72 28 |URI = ""|;...for(|
|00000990| 69 3d 30 3b 69 3c 31 30 | 3b 69 2b 2b 29 0d 0a 09 |i=0;i<10|;i++)...|
|000009a0| 7b 0d 0a 09 09 69 66 28 | 41 70 70 6c 69 63 61 74 |{....if(|Applicat|
|000009b0| 69 6f 6e 50 61 74 68 73 | 5b 69 5d 20 21 3d 20 22 |ionPaths|[i] != "|
|000009c0| 22 29 0d 0a 09 09 7b 0d | 0a 09 09 09 6c 20 3d 20 |")....{.|....l = |
|000009d0| 4c 65 6e 28 41 70 70 6c | 69 63 61 74 69 6f 6e 50 |Len(Appl|icationP|
|000009e0| 61 74 68 73 5b 69 5d 29 | 3b 0d 0a 09 09 09 69 66 |aths[i])|;.....if|
|000009f0| 28 4c 65 66 74 28 55 52 | 49 2c 20 6c 29 20 3d 3d |(Left(UR|I, l) ==|
|00000a00| 20 41 70 70 6c 69 63 61 | 74 69 6f 6e 50 61 74 68 | Applica|tionPath|
|00000a10| 73 5b 69 5d 20 26 26 20 | 28 4c 65 6e 28 55 52 49 |s[i] && |(Len(URI|
|00000a20| 29 20 3d 3d 20 6c 20 7c | 7c 20 4d 69 64 28 55 52 |) == l ||| Mid(UR|
|00000a30| 49 2c 20 6c 2c 20 31 29 | 20 3d 3d 20 22 2f 22 29 |I, l, 1)| == "/")|
|00000a40| 29 0d 0a 09 09 09 7b 0d | 0a 09 09 09 09 53 75 62 |).....{.|.....Sub|
|00000a50| 55 52 49 20 3d 20 4d 69 | 64 28 55 52 49 2c 20 6c |URI = Mi|d(URI, l|
|00000a60| 29 3b 0d 0a 09 09 09 09 | 72 65 74 75 72 6e 20 41 |);......|return A|
|00000a70| 70 70 6c 69 63 61 74 69 | 6f 6e 4f 62 6a 65 63 74 |pplicati|onObject|
|00000a80| 73 5b 69 5d 3b 0d 0a 09 | 09 09 7d 0d 0a 09 09 7d |s[i];...|..}....}|
|00000a90| 0d 0a 09 7d 0d 0a 09 72 | 65 74 75 72 6e 20 4e 6f |...}...r|eturn No|
|00000aa0| 6e 65 3b 0d 0a 7d 0d 0a | 0d 0a 00 |ne;..}..|... |
+--------+-------------------------+-------------------------+--------+--------+